using System.Collections.Generic;

public class Table_GlobalDataItem
{
    /// <summary>
    /// 唯一ID
    /// <summary>
    public int Id { get; private set; }
    /// <summary>
    /// 参数Int
    /// <summary>
    public int IntParam { get; private set; }
    /// <summary>
    /// 参数Float
    /// <summary>
    public float FloatParam { get; private set; }
    /// <summary>
    /// 参数Boolean
    /// <summary>
    public bool BooleanParam { get; private set; }
    /// <summary>
    /// 参数String
    /// <summary>
    public string StringParam { get; private set; }

    public Table_GlobalDataItem(ExcelLineReader reader)
    {
        Id = reader.ReadInt();
        IntParam = reader.ReadInt();
        FloatParam = reader.ReadFloat();
        BooleanParam = reader.ReadBool();
        StringParam = reader.ReadString();
    }
}

public class Table_GlobalDataMgr : IDataMgr
{
    protected override string FileName { get { return "Txt/GlobalData.txt"; } }

    protected List<Table_GlobalDataItem> mItemList = new List<Table_GlobalDataItem>();
    public Table_GlobalDataItem GetItemByIdx(int idx)
    {
        return mItemList[idx];
    }
    public Table_GlobalDataItem GetItemById(int id)
    {
        int idx = GetIdxById(id);
        return GetItemByIdx(idx);
    }

    public override void Load(ExcelLineReader reader)
    {
        var item = new Table_GlobalDataItem(reader);
        mItemDic.Add(item.Id, mDataCount);
        mItemList.Add(item);
    }
}